-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move resolve_lifetimes
into a proper query
#46657
Conversation
5b96e8d
to
c0f68fd
Compare
2d9214f
to
15fda6a
Compare
cc @gaurikholkar -- this is the PR I was talking about |
Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case.
15fda6a
to
b7794c0
Compare
Thanks @nikomatsakis |
) -> Rc<ResolveLifetimes> { | ||
assert_eq!(for_krate, LOCAL_CRATE); | ||
|
||
let named_region_map = krate(tcx).unwrap_or_default(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit violent and likely to cause cascade errors - if resolving lifetimes for one item fails, it will destroy all lifetime information without aborting compilation.
On a second reading, krate
can't actually return an error and trigger this misbehavior.
}) | ||
} | ||
|
||
fn krate<'tcx>(tcx: TyCtxt<'_, 'tcx, 'tcx>) -> Result<NamedRegionMap, ErrorReported> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this function actually return ErrorReported
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I should fix that. A holdover from older code.
If OTOH, With that done, and because I don't think |
r=me with that cleaned up. |
@bors r=arielb1 |
📌 Commit fdbd9b0 has been approved by |
move `resolve_lifetimes` into a proper query Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case. r? @michaelwoerister
☀️ Test successful - status-appveyor, status-travis |
Now that we made
resolve_lifetimes
into a query, elision errors nolonger abort compilation, which affects some tests.
Also, remove
dep_graph_crosscontaminate_tables
-- there is no a path inthe dep-graph, though red-green handles it. The same scenario
is (correctly) tested by issue-42602.rs in any case.
r? @michaelwoerister